package fr.maistre.test_spring;

import java.util.ArrayList;

public class Circus {

	private String name;
	private ArrayList<Performer> performers = new ArrayList<Performer>();

	public Circus(String name) {
		this.name = name;
	}

	public void makeTheShow() throws PerformanceException {
		presentTheCircus(); // in aoc, must be done by commentateur.

		for (Performer performer : performers) {

			performer.perform();
		}

	}

	private void presentTheCircus() {
		System.out
				.println("Hello Ladies and Gentlemen, welcome to the greatest Circus in the world, the "
						+ name + " !!");

	}

	public void setPerformers(ArrayList<Performer> perfomers) {
		this.performers = perfomers;
	}

}
